@using Microsoft.AspNetCore.Mvc.TagHelpers
@using Microsoft.Extensions.Primitives
@model AuthorizeViewModel
@{
  ViewData["Title"] = "授权";
  Layout = "~/Views/Shared/_HeadlessLayout.cshtml";
}
<div class="jumbotron">
  <h1>授权确认</h1>

  <p class="lead text-left">您是否同意授权 <strong>@Model.ApplicationName</strong> 访问您的数据？（请求的权限范围：@Model.Scope）</p>

  <form asp-controller="Authorization" asp-action="Authorize" method="post">
    @* 传递请求参数到 Accept/Reject actions: *@
    @foreach (var parameter in Context.Request.HasFormContentType ?
    (IEnumerable<KeyValuePair<string, StringValues>>)Context.Request.Form : Context.Request.Query)
    {
      <input type="hidden" name="@parameter.Key" value="@parameter.Value" />
    }

    <input class="btn btn-lg btn-success" name="submit.Accept" type="submit" value="同意" />
    <input class="btn btn-lg btn-danger" name="submit.Deny" type="submit" value="拒绝" />
  </form>
</div>
